<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>管理员编辑页面</title>

  </head>
  
  <body>
  <%     response.setCharacterEncoding("gbk");
        request.setCharacterEncoding("gbk");
		 String username=(String)request.getParameter("username");
		 String password=(String)request.getParameter("password");
		 String error=null;
		 //String path = null;
		 if(username==""||password==""){
				error="用户名密码不可为空";
				out.print(error);
				//path="RegisterPro";
				
			} 
	  else if(!username.equals("陈一笑")&&!password.equals("123")){
				error="请检查用户名或者密码";
				out.print(error);
				//path="RegisterPro";			
			} 
		if(error!=null)		
		{   request.setAttribute("error", error);
			request.getRequestDispatcher("logingly.jsp").forward(request,response);
			}
			
%>
    <a href='addcourse.jsp'>添加课程</a> <br>
    <a href='seecourse.jsp'>查看课程</a> <br>
  </body>
</html>
